import Emberbox from "@/utils/mapbox/engine";
import { baseurl } from "../../config";

export default function polygonsManage(emberbox: Emberbox) {
  let data: any = null,
    polygons: any = null,
    isShow: boolean = true;
  fetch(`${baseurl}/polygons`)
    .then((res) => res.json())
    .then((res: any) => {
      data = res;
      console.log("polygons", res);

      polygons = emberbox.geojsonManage?.addJson(res.f1);
      isShow = true;
      //   console.log("polygons", polygons);
    })
    .catch((err) => {
      console.log("polygons", err);
    });
}
